<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function fun(a) {
            if (a === 2 || a === 1) {
                return 1
            }
            var res = fun(a - 1) + fun(a - 2)
            return res
        }
        // 打印第十位
        console.log(fun(10))
    </script>
</body>

</html>